﻿#region changelog
/*
 * 02/04/09 - wbw (Seagull Consulting): Original code
 * 02/13/09 - wbw : change file extension on TvDBXMLFile from mpg.xml to xml.  append xml to the OutputFile in the Profile to construct the file name.
 * 02/26/09 - wbw : change regex to make matching case insensitive.
 * 11/22/11 - as : added rijndael encryption and encrypted API key constants
 */
#endregion

using System;
using System.Collections.Generic;
using System.Text;

namespace Durrant.Plugins.TvDB
{
    public static class Constants
    {
        //TvDB Constants
        public const string TVDB_BASE_URL = @"http://thetvdb.com/";
        public const string URL_SPACE = @"%20";
        public const string TVDB_GET_SERIES_BY_NAME = @"api/GetSeries.php?seriesname={0}";
        public const string TVDB_GET_SERIES_BY_ID = @"api/{0}/series/{1}/en.xml";
        public const string TVDB_GET_EPISODE = @"api/{0}/series/{1}/default/{2}/{3}/en.xml";
        public const string EXTRACTION_REGEX = @"(?<series>.+)\.[s,S](?<season>\d+)[e,E](?<episodenbr>\d+)\.";

        //File Constants
        public const string MPG_FILE_EXT = @".mpg";
        public const string XML_FILE_EXT = @".xml";
        public const string DVRMS_FILE_EXT = @".dvr-ms";
        public const string FILE_DIALOG_FILTER = @"AVI Files|*.avi|MKV Files|*.mkv|MPEG Files|*.mpg|All Files|*.*";

        //XML Constants
        public const string SERIES_ATTRIBUTE_NAME = "Name";
        public const string SERIES_ATTRIBUTE_ALIAS = "Alias";
        public const string TORRENT_NAME_XML = "Torrent";
        public const string SERIES_ID = "id";
        public const string SERIES_NAME = "SeriesName";
        public const string SERIES_NAME_XML = "SERIES_NAME";
        public const string SERIES_DAY_OF_WEEK = "Airs_DayOfWeek";
        public const string SERIES_AIR_TIME = "Airs_Time";
        public const string SERIES_NETWORK = "Network";
        public const string SERIES_NETWORK_XML = "SERIES_NETWORK";
        public const string SERIES_CONTENT_RATING = "ContentRating";
        public const string SERIES_CONTENT_RATING_XML = "SERIES_CONTENT_RATING";
        public const string SERIES_RUNTIME = "Runtime";
        public const string SERIES_RUNTIME_XML = "SERIES_RUNTIME";
        public const string SERIES_GENRE = "Genre";
        public const string SERIES_GENRE_XML = "SERIES_GENRE";
        public const string SERIES_OVERVIEW = "Overview";
        public const string EPISODE_ID = "id";
        public const string EPISODE_NAME = "EpisodeName";
        public const string EPISODE_NAME_XML = "EPISODE_NAME";
        public const string EPISODE_FIRST_AIRED = "FirstAired";
        public const string EPISODE_FIRST_AIRED_XML = "EPISODE_FIRST_AIRED";
        public const string EPISODE_OVERVIEW = "Overview";
        public const string EPISODE_OVERVIEW_XML = "EPISODE_OVERVIEW";
        public const string EPISODE_FILENAME_XML = "EPISODE_FILENAME";
        public const string EPISODE_RECORD_DATETIME_XML = "EPISODE_RECORD_DATETIME";
        public const string XMLRESERVEDCHARAMPERSAND = @"&";
        public const string XML_RESERVERED_CHAR_PERCENT = @"%";
        public const string XML_RESERVED_STRING_AMPERSAND = @"and";
        public const string XML_RESERVED_STRING_PERCENT = @"percent";
        public const string XML_RESERVED_CHAR_GT = @">";
        public const string XML_RESERVED_CHAR_LT = @"<";

        //Time Constants
        public const string AM = "AM";
        public const string PM = "PM";

        //Misc Constants
        public const string GENRE_SEPERATOR = @"|";

        // API Key Encryption Constants
        // This is not secure but simply intended to provide a simple means to obfuscate the APIKey from disassembler tools e.g. Reflector
        // Given the source code is freely available any further attempt to secure the apikey seems unecessary
        public const string API_KEY = "BjN9/Eg0KvvGJlFIiIGEZZuatZ+ULsGvgGZf9Vw9owtz5nw1eybQxxvHCHAFZdZT";
        public const string ENCRYPTION_PASSWORD = "a094ab40-053a-4115-9564-544421db77e3";
        public const string SALT = "59e9ebd9-406f-484b-955e-e19dd58d7d95";
    }
}
